package cn.tedu;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.util.Arrays;
import java.util.List;

public class SpringRunner {

    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(SpringConfig.class);
        //                             传入配置类作为参数 ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑ ↑
        String[] names = context.getBeanDefinitionNames();
        System.out.println(Arrays.toString(names));


    }

}
